//package xiangmu.schoolpaper.controller.system;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.util.CollectionUtils;
//import org.springframework.web.bind.annotation.*;
//import xiangmu.schoolpaper.pojo.VO.*;
//import xiangmu.schoolpaper.result.Result;
//import xiangmu.schoolpaper.service.AdminDataListService;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("/system")
//@Slf4j
//@Tag(name = "管理员端——数据列表接口")
//public class AdminDataListController {
//    @Autowired
//    private AdminDataListService adminDataListService;
//
//    /*
//        先决条件
//     */
//    @GetMapping("/graduationYear")
//    @Operation(summary = "1先决条件——获取所有毕业年份（本学院）")
//    public Result<List<Integer>> graduationYear(Integer facultyId){
//        log.info("返回毕业年份");
//        List<Integer> graduationYear = adminDataListService.graduationYear(facultyId);
//        return Result.success(graduationYear);
//    }
//
//    @GetMapping("/studentInfo")
//    @Operation(summary = "2先决条件——获取所有学生姓名和学号（本学院）")
//    public Result<List<SystemNameAndAccount>> nameAndId(Integer facultyId){
//        log.info("返回学生姓名和学号");
//        List<SystemNameAndAccount> systemNameAndAccount = adminDataListService.nameAndId(facultyId);
//        return Result.success(systemNameAndAccount);
//    }
//
//    /*
//        论文元数据管理
//    */
//    @GetMapping("/getAllStudentPaper")
//    @Operation(summary = "3论文元数据管理——获取所有符合筛选条件的论文元数据")
//    public Result<IPage<SystemSplitStudentInfo>> getAllStudentPaper(
//            @RequestParam(defaultValue = "1") Integer currentPage,
//            @RequestParam(defaultValue = "10") Integer pageSize,
//            @RequestParam(required = false) Integer facultyId,
//            @RequestParam(required = false) Integer graduationYear,
//            @RequestParam(required = false) String studentAccount,
//            @RequestParam(required = false) String paperTitle
//    ) {
//        log.info("返回所有符合筛选条件的论文元数据");
//        IPage<SystemSplitStudentInfo> pageData = adminDataListService.getAllStudentPaper(currentPage, pageSize, facultyId, graduationYear, studentAccount, paperTitle);
//        return Result.success(pageData);
//    }
//
//    /*
//        抽取正文内容管理
//     */
//    @GetMapping("/extractContent")
//    @Operation(summary = "4抽取正文内容管理——获取所有符合筛选条件的抽取的正文数据")
//    public Result<IPage<ExtractContentVO>> extractContent(
//            @RequestParam(defaultValue = "1") Integer currentPage,
//            @RequestParam(defaultValue = "10") Integer pageSize,
//            @RequestParam(required = false) Integer facultyId,
//            @RequestParam(required = false) Integer graduationYear,
//            @RequestParam(required = false) String studentAccount,
//            @RequestParam(required = false) String paperTitle
//    ){
//        log.info("返回所有符合筛选条件的抽取的正文数据");
//        IPage<ExtractContentVO> pageData = adminDataListService.extractContent(currentPage, pageSize, facultyId, graduationYear, studentAccount, paperTitle);
//        return Result.success(pageData);
//    }
//
//    /*
//        评分管理
//     */
//    // 列表
//    @GetMapping("/allPaper/Score")
//    @Operation(summary = "5评分管理——获取所有符合筛选条件的评分数据")
//    public Result<IPage<SystemOneScoreVO>> allPaperScore(
//            @RequestParam(defaultValue = "1") Integer currentPage,
//            @RequestParam(defaultValue = "10") Integer pageSize,
//            @RequestParam(required = false) Integer facultyId,
//            @RequestParam(required = false) Integer graduationYear,
//            @RequestParam(required = false) String studentAccount,
//            @RequestParam(required = false) String paperTitle
//    ) {
//        log.info("返回所有符合筛选条件的评分数据");
//        IPage<SystemOneScoreVO> pageData = adminDataListService.allPaperScore(currentPage, pageSize, facultyId, graduationYear, studentAccount, paperTitle);
//        return Result.success(pageData);
//    }
//
//    // 个人分数详情
//    @GetMapping("/getByStudentId/paper")
//    @Operation(summary = "6评分管理——根据学生的id获取学生详细评分信息")
//    public Result<SystemAllScoreAndSuggestByStudentAccountVO> getByStudentAccount(@RequestParam String studentAccount) {
//        log.info("根据学生的id返回学生论文信息");
//        SystemAllScoreAndSuggestByStudentAccountVO data = adminDataListService.getByStudentAccount(studentAccount);
//        if (data == null || CollectionUtils.isEmpty(data.getFactors())) {
//            return Result.error("未查询到该学生的论文评分信息");
//        }
//        return Result.success(data);
//    }
//}
